/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 通知 */
// 新增通知
const noticeCreate = (params) => axios.post(baseUrl + url.notice.create, params)

// 删除通知
const noticeDelete = (id) => axios.delete(baseUrl + url.notice.delete + `/${id}`)

// 修改通知
const noticeUpdate = (params, id) => axios.post(baseUrl + url.notice.update + `/${id}`, params)

// 获取某个通知
const noticeLoad = (id) => axios.get(baseUrl + url.notice.load + `/${id}`)

// 获取通知列表
const noticePage = (params) => axios.get(baseUrl + url.notice.page, { params })

export default {
    noticeCreate,
    noticeDelete,
    noticeUpdate,
    noticeLoad,
    noticePage,
}